<?php

namespace App\Models;

use Dcat\Admin\Traits\HasDateTimeFormatter;

use Illuminate\Database\Eloquent\Model;

class SwtBjAsyncOrder extends Model
{
	use HasDateTimeFormatter;
    protected $table = 'swt_bj_async_order';

    protected $guarded = [];

    public function machine()
    {
        return $this->hasOne(SwtMachine::class, 'machine_no', 'device_code') -> withTrashed();
    }

    public function order()
    {
        return $this->hasOne(SwtOrder::class, 'order_sn', 'order_id');
    }

}
